package com.ruoyi.event.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 签到业务对象 event_qd
 *
 * @author strongme
 * @date 2023-02-04
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class EventQdBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = {EditGroup.class})
    private Long qdId;

    /**
     * 吸毒人员id
     */
    @NotNull(message = "吸毒人员id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long userId;

    /**
     * 工作人员id
     */
    @NotNull(message = "工作人员id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long memberId;

    /**
     * 签到地址
     */
    @NotBlank(message = "签到地址不能为空", groups = {AddGroup.class, EditGroup.class})
    private String qddz;

    /**
     * 图片
     */
    @NotBlank(message = "图片不能为空", groups = {AddGroup.class, EditGroup.class})
    private String img;

    /**
     * 视频
     */
    @NotBlank(message = "视频不能为空", groups = {AddGroup.class, EditGroup.class})
    private String sp;

    /**
     * 经度
     */
    private BigDecimal lng;

    /**
     * 纬度
     */
    private BigDecimal lat;

    /**
     * 备注
     */
    private String remark;

    /**
     * 签到开始时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date start;

    /**
     * 签到结束时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date end;


}
